{% import "TopxiaWebBundle::macro.html.twig" as web_macro %}
{#登录后#}
{% if app.user %}
<div class="modal-dialog modal-card-pack modal-logined">
  <div class="modal-content">
    <div class="modal-body">
      <div class="modal-info">
        {{'您领取了一张'|trans}}{% if cardType is defined and cardType == "coupon" %}{{'优惠券'|trans}}{% endif %}{% if cardType is defined and cardType == "moneyCard" %}{{'学习卡'|trans}}{% endif %}，{{'已添加至“我的卡包“'|trans}}
      </div>
      {#卡券内容#}
      {% if cardId is not null and cardDetail is not null and cardType == "coupon" %}
        {% include 'TopxiaWebBundle:Card:coupon-useable.html.twig' %}
      {% endif %}
      {% if cardId is not null and cardDetail is not null and cardType == "moneyCard" %}
        {% include 'TopxiaWebBundle:Card:moneycard-useable.html.twig' %}
      {% endif %}
      <div class="modal-action">
        <a class="btn btn-ghost-white btn-xlg money-card-use" href="javascript:;" data-url="{{ path('money_card_use_without_password',{ id:cardDetail.id,filter:app.request.query.get('filter') }) }}" data-target-url="{{ path('my_cards', {cardType:'moneyCard', filter:app.request.query.get('filter')}) }}">{{'立即使用'|trans}}</a>
      </div>
    </div>
  </div>
</div>
{% else %}

{#登录前#}
<div class="modal-dialog modal-card-pack">
  <div class="modal-content">
    <div class="modal-body">
      <div class="modal-info">
        {{'您还没有登录，请在登录后领取。'|trans}}
      </div>
      {% if cardId is not null and cardDetail is not null and cardType == "coupon" %}
        {% include 'TopxiaWebBundle:Card:coupon-useable.html.twig' %}
      {% endif %}
      {% if cardId is not null and cardDetail is not null and cardType == "moneyCard" %}
        {% include 'TopxiaWebBundle:Card:moneycard-useable.html.twig' %}
      {% endif %}
      <div class="modal-action">
        <a href="" class="btn btn-ghost-white btn-xlg" data-dismiss="modal" >{{'登录查看'|trans}}</a>
      </div>
    </div>
  </div>
</div>
{% endif %}